#ifndef __SN32F240_FLASHROM_H
#define __SN32F240_FLASHROM_H


/*_____ I N C L U D E S ____________________________________________________*/
#include <SN32F280.h>
#include <SN32F200_Def.h>

#define		ROM_MASK_DATA					0xA5
#define		USER_COLOUR_DEF				0x08
#define		USER_GM_INDEX_DEF			0x01
#define		USER_LIGHT_DEF				0x04
#define		USER_SPEED_DEF				0x03
#define		USER_IND_LED_DEF			0x04

#define		OLED_USER_COLOUR_INDEX	0x08
#define		OLED_USER_LIGHT_DEF		0x03
#define		OLED_USER_SPEED_DEF		0x03

#define		ROM_RESET_ADDR				0x00007000
#define		ROM_USER_ADDR					0x00008000
#define		ROM_USER_PAGE1_ADD		0x00008000
#define		ROM_USER_PAGE2_ADD		0x00008400

#define		ROM_USER_LED_API_ADDR		0x00008020
#define		ROM_USER_OLED_API_ADDR	0x00008030

#define		ROM_SET_PAGE_ADDR			0x00008000
#define		ROM_GM8_PAGE_ADDR			0x00008000
#define		ROM_GM9_PAGE_ADDR			0x00008000
#define		ROM_GM0_PAGE_ADDR			0x00008000
#define		ROM_GM1_PAGE_ADDR			0x00008000
#define		ROM_GM2_PAGE_ADDR			0x00008000
#define		ROM_GM3_PAGE_ADDR			0x00008000
#define		ROM_GM4_PAGE_ADDR			0x00008000

#define		ROM_GM5_PAGE_ADDR			0x00008400
#define		ROM_GM6_PAGE_ADDR			0x00008400
#define		ROM_GM7_PAGE_ADDR			0x00008400
#define		ROM_MACRO1_PAGE_ADDR	0x00008800
#define		ROM_MACRO2_PAGE_ADDR	0x00008840
#define		ROM_MACRO3_PAGE_ADDR	0x00008880
#define		ROM_MACRO4_PAGE_ADDR	0x000088c0
#define		ROM_MACRO5_PAGE_ADDR	0x00008900

#define		ROM_GM8_OFFSET				0x080
#define		ROM_GM9_OFFSET				0x100
#define		ROM_GM0_OFFSET				0x180
#define		ROM_GM1_OFFSET				0x200		
#define		ROM_GM2_OFFSET				0x280
#define		ROM_GM3_OFFSET				0x300
#define		ROM_GM4_OFFSET				0x380

#define		ROM_GM5_OFFSET				0x000
#define		ROM_GM6_OFFSET				0x080
#define		ROM_GM7_OFFSET				0x100

#define		RF_USER_ROM_ADDR			0x1FFF0C00 

extern const uint8_t RESET_ROM_TAB[];
extern const uint8_t GM8_ROM_TAB[128];
extern const uint8_t GM9_ROM_TAB[128];
extern const uint8_t GM0_ROM_TAB[128];

#endif

